package com.ysq.www.api.order.controller;


import com.ysq.www.api.order.service.IOrderService;
import com.ysq.www.common.result.ResultMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 订单表 前端控制器
 * </p>
 *
 * @author dql
 * @since 2020-08-10
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private IOrderService orderService;

    /**
     * 分页查询订单
     * @param pageNumber 页码
     * @param pageSize 页大小
     * @param userId 用户id
     * @return
     */
    @GetMapping("/page")
    public ResultMsg selectByPage(Integer pageNumber,Integer pageSize,Integer userId){
        ResultMsg rm = orderService.selectByPage(pageNumber,pageSize,userId);
        return rm;
    }



}
